<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="AddRate.aspx.vb" Inherits="GTSWeb_Carrier_Manage" title="GTS Frieght Management System" MaintainScrollPositionOnPostback="true" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" Runat="Server">
<h3>Add Rate Group</h3>
    <asp:Literal ID="Message" runat="server"></asp:Literal>
    <asp:Panel ID="pRate" runat="server" Width="100%">
    <table>
        <tr>
            <td style="width: 219px; height: 20px; text-align: right;">
                <strong>Carrier:</strong></td>
            <td style="width: 168px; height: 20px">
                <asp:DropDownList ID="ddlCarrier" runat="server" DataSourceID="ContractCarrier"
                    DataTextField="CarrierName" DataValueField="ContractID" AppendDataBoundItems="True" Width="166px">
                <asp:ListItem Value="-1">Choose a Carrier</asp:ListItem>
                </asp:DropDownList></td>
            <td style="width: 590px; height: 20px">
            </td>
        </tr>
        <tr>
            <td style="width: 219px; text-align: right;">
                <strong>Origin:</strong>
                </td>
            <td style="width: 168px">
                <asp:DropDownList ID="ddlOrigin" runat="server" DataSourceID="RateLocation"
                    DataTextField="City" DataValueField="RateLocationID" AppendDataBoundItems="True" Width="166px">
                <asp:ListItem Value="-1">Choose Origin</asp:ListItem>
                </asp:DropDownList></td>
            <td style="width: 590px">
                <asp:LinkButton ID="lbNew" runat="server" PostBackUrl="~/GTSWeb/Carrier/ManageLocations.aspx" CausesValidation="False">New</asp:LinkButton></td>
        </tr>
        <tr>
            <td style="width: 219px; height: 25px; text-align: right;">
                <strong>Destination:</strong>
            </td>
            <td style="width: 168px; height: 25px">
                <asp:DropDownList ID="ddlDestination" runat="server" DataSourceID="RateLocation"
                    DataTextField="City" DataValueField="RateLocationID" AppendDataBoundItems="True" Width="166px">
                <asp:ListItem Value="-1">Choose Destination</asp:ListItem>
                </asp:DropDownList></td>
            <td style="width: 590px; height: 25px">
                <asp:LinkButton ID="lbNew1" runat="server" PostBackUrl="~/GTSWeb/Carrier/ManageLocations.aspx" CausesValidation="False">New</asp:LinkButton></td>
        </tr>
        <tr>
            <td style="width: 219px">
                </td>
            <td style="width: 168px; text-align: right">
                <asp:LinkButton ID="lbAdd" runat="server">Add Rate</asp:LinkButton></td>
            <td style="width: 590px">
            </td>
        </tr>
    </table>
        &nbsp;
    </asp:Panel>
    <asp:Panel ID="pButtons" runat="server" Width="100%">
        <table>
            <tr>
            <td><asp:LinkButton ID="lbAddRateDetail" runat="server" PostBackUrl="~/GTSWeb/Carrier/AddRateDetail.aspx">Add Rate Detail</asp:LinkButton>
                &nbsp;
                <asp:LinkButton ID="lbAddSurcharge" runat="server" PostBackUrl="~/GTSWeb/Carrier/AddRateSurcharge.aspx">Add Surcharge Details</asp:LinkButton></td>
            </tr>
        </table>
    </asp:Panel>
    &nbsp;&nbsp;<asp:ObjectDataSource ID="RateLocation" runat="server" InsertMethod="AddRateLocation"
            OldValuesParameterFormatString="original_{0}" SelectMethod="GetRateLocation"
            TypeName="GTSSystem.BLL.RateLocation" UpdateMethod="UpdateRateLocation">
            <UpdateParameters>
                <asp:Parameter Name="RateLocationID" Type="Int32" />
                <asp:Parameter Name="City" Type="String" />
                <asp:Parameter Name="Province" Type="String" />
                <asp:Parameter Name="Country" Type="String" />
            </UpdateParameters>
            <SelectParameters>
                <asp:ProfileParameter Name="BranchID" PropertyName="BranchId" Type="Int32" />
            </SelectParameters>
            <InsertParameters>
                <asp:Parameter Name="BranchID" Type="Int32" />
                <asp:Parameter Name="City" Type="String" />
                <asp:Parameter Name="Province" Type="String" />
                <asp:Parameter Name="Country" Type="String" />
            </InsertParameters>
        </asp:ObjectDataSource>
        <asp:ObjectDataSource ID="ContractCarrier" runat="server" InsertMethod="AddContract"
            OldValuesParameterFormatString="original_{0}" SelectMethod="GetContractInfoByClientBranchID"
            TypeName="GTSSystem.BLL.Contract">
            <SelectParameters>
                <asp:ProfileParameter Name="ClientBranchID" PropertyName="BranchId" Type="Int32" />
            </SelectParameters>
            <InsertParameters>
                <asp:Parameter Name="ClientID" Type="Int32" />
                <asp:Parameter Name="ClientBranchID" Type="Int32" />
                <asp:Parameter Name="CarrierID" Type="Int32" />
                <asp:Parameter Name="ContractStartDate" Type="DateTime" />
                <asp:Parameter Name="ContractEndDate" Type="DateTime" />
            </InsertParameters>
        </asp:ObjectDataSource>

</asp:Content>

